﻿@section head{
    <link href="~/theme/default/personal_center/personal.index.css" rel="stylesheet" asp-append-version="true" />
}
<div id="app" class="personal zb-h zb-flex zb-flex-column zb-flex-1" style="height: 100%; overflow: hidden;">
    <div id="userInfo" class="zb-flex zb-border-bottom">
        @Html.AntiForgeryToken()
        <div class="head-portrait">
            <el-upload class="avatar-uploader"
                       action="/Personal/UploadAvtar"
                       :show-file-list="false"
                       :on-success="handleAvatarSuccess"
                       :on-error="handleAvatarError"
                       :before-upload="beforeAvatarUpload"
                       accept="image/png, image/jpeg">
                <el-image style="width: 100px; height: 100px"
                          :src="avatar.url"
                          fit="cover">
                    <div slot="error" class="image-slot">
                        <i class="el-icon-picture-outline"></i>
                    </div>
                </el-image>
                @*<img v-if="imageUrl" :src="imageUrl" class="avatar">
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>*@
            </el-upload>
        </div>
        <div class="zb-flex-1">
            <div class="input-suffix">
                用户账号：
                <span v-text="user.user_no"></span>
            </div>
            <div class="input-suffix">
                用户姓名：
                <el-input placeholder="请输入用户姓名"
                          v-model="user.user_name">
                </el-input>
            </div>
            <div class="input-suffix">
                用户性别：
                <el-select v-model="user.user_sex" placeholder="请选择性别">
                    <el-option v-for="item in options"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                </el-select>
            </div>
            <div class="input-suffix">
                手机号码：
                <el-input placeholder="请输入手机号码"
                          v-model="user.user_mobile">
                </el-input>
            </div>
            <div class="input-suffix">
                用户邮箱：
                <el-input placeholder="请输入用户邮箱"
                          v-model="user.user_email">
                </el-input>
            </div>
            <div class="input-suffix">
                <el-button type="primary" style="margin-left: 75px;" @@click="onUpdate">确认修改</el-button>
            </div>
        </div>
    </div>

    <el-table :data="tableData.records"
              border
              height="250"
              class="zb-border-no"
              ref="tblRecords"
              style="width: 100%"
              size="mini">
        <el-table-column type="index"
                         width="50"
                         align="center"
                         title="序号"
                         fixed="left">
        </el-table-column>

        <el-table-column prop="log_date"
                         label="登录时间"
                         width="140"
                         align="center">
            <template slot-scope="scope">
                <span v-text="scope.row.log_date.replace('T',' ')"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_user"
                         label="登录人員"
                         width="180">
        </el-table-column>

        <el-table-column prop="log_type"
                         label="登录类型"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="loginType[scope.row.log_type]||''"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_terminal"
                         label="登录设备"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="loginTerminal[scope.row.log_terminal]||''"></span>
            </template>
        </el-table-column>

        <el-table-column prop="log_ip"
                         label="登录IP"
                         width="120"
                         align="center">
        </el-table-column>
        <el-table-column prop="log_status"
                         label="状态"
                         width="90"
                         align="center">
            <template slot-scope="scope">
                <span v-text="status[scope.row.log_status]||''" :class="getStatusClass(scope.row.log_status)"></span>
            </template>
        </el-table-column>
        <el-table-column prop="log_memo"
                         label="备注">
        </el-table-column>
    </el-table>
</div>

@section script{
    <script src="~/module/common/md5.js"></script>
    <script src="~/module/personal_center/personal.index.js" asp-append-version="true" type="text/babel"></script>
} 